
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AP费用预算使用报表</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="__STATIC__/layout/favicon.ico"> 
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <style>
      .radio-inline input[type=radio] {
            margin-top: 4px
        }
    </style>
</head>

<body style="color:#333;padding:3px;overflow-x: auto;">
    <!-- 标题 -->
    <div class="page-heade">
      <h2 class="title_color text-center">AP费用预算使用报表</h2>
    </div>
    <!-- 标题 -->
     <div>
   <form action="" class="form-inline" id="f1" method="post">
      <table class="row-margin-top tab-content table-bordered table" border="1">
          <tr>
            <td>
              <label for="" class="form-label">一级考核期</label>
              <div class="form-group">
                <select name="cid" id="cid" class="form-control">
                          {volist name="cainian" id="c"}
                            <option value="{$c.id}" {if $c.id==$cid} selected {/if} >{$c.title}</option>
                          {/volist}
                      </select><span class="lr_5"></span>
                    <div class="form-group">
                <select name="k1id" id="k1id" class="select form-control">
                        <option value="0">请选择</option>
                        {volist name="kaohe1" id="c"}
                        <option value="{$c.id}" {if $c.id==$k1id} selected {/if} >{$c.title}</option>
                        {/volist}
                </select>
              </div>
            </td>
          </tr>
      <tr>
       <td colspan="2" class="text-center">
           <button class="btn btn-info query" >查询</button>
           <button class="btn btn-info emptyIf" type="button">清空查询条件</button>
           <button class="btn btn-info LendExcel" onclick="dc({$cid},{$k1id})" type="button">导出Excel</button>
            </td>
          </tr>
      </table>
    <p class="text-right">单位：人民币元</p>
      <table class="table table-hover table-bordered bud_hei table-striped bud_hei text-center">
                 <tr class="info">
                        <th class="text-center">序号</th>
                        <th class="text-center">预算金额</th>
                        <th class="text-center">已批复金额</th>
                        <th class="text-center">未使用金额</th>
                        <th class="text-center">申请中金额</th>
                        
                        <th class="text-center">红绿灯</th>
                    </tr>
                    <tbody>
                      <tr>
                        <td>1</td>
                        <td class="ObjectNum">{$apply.ys}</td>
                        <td class="ObjectNum">{$apply.pf}</td>
                        <td class="ObjectNum">{$apply.sy}</td>
                        <td class="ObjectNum">{$apply.sq}</td>
                        
                        <td>{if $apply.deng==2}<div class="Yellowlay">黄灯</div>{elseif $apply.deng==1}<div class="Greenlay">绿灯</div>{else}<div class="Redlay">红灯</div>{/if}</td>
                      </tr>
                    </tbody>
                    <tfoot>
                      <tr class="trTotal">
                        <td>合计:</td>
                        <td class="ObjectNum">{$apply.ys}</td>
                        <td class="ObjectNum">{$apply.pf}</td>
                        <td class="ObjectNum">{$apply.sy}</td>
                        <td class="ObjectNum">{$apply.sq}</td>
                        
                        <td>{if $apply.deng==2}<div class="Yellowlay">黄灯</div>{elseif $apply.deng==1}<div class="Greenlay">绿灯</div>{else}<div class="Redlay">红灯</div>{/if}</td>
                      </tr>
                    </tfoot>
              </table>
 <!--<h5 class="text-center"  style="font-size: 13px;font-weight: 500">
                    总共有12条记录，第1/2页,当前页<input id="page" type="text"  style="width: 40px" value="1"/><span id="gopage">Go</span>&nbsp;&nbsp;<span id="fistpage">首页</span>&nbsp;&nbsp;
                    每页显示
                    <select id="pagesize">
                        <option value='10' selected>10条</option>
                        <option value='15'>15条</option>
                        <option value='20'>20条</option>

                    </select>
                </h5>-->
     <div class="padding-10 colorRed" style="margin-left: 10px">
      <p>说明：</p>
      <p class="padding-10">1.红灯表示已批复金额大于预算金额;绿灯表示未使用金额大于等于申请中金额;黄灯表示未使用金额小于申请中金额。</p>
      <p>2.已批复金额和申请中金额的金额按活动时间分摊到每一天。</p>
      <p class="padding-10">3.已核销金额计入活动开始时间。</p>
     </div>
</form>
    </div>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <!--统计代码，可删除-->
    <script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
    <script src="__STATIC__/layout/js/common.js"></script>
    <script>
    function dc(cid,k1id){
      window.open("{:url('yssydc')}?cid="+cid+"&k1id="+k1id)
    }
    $("#cid").change(function(){
    $("#k1id").html("<option value='1'>请选择</option>")
    var cid=$(this).val();
      $.post("{:url('niantokao1')}",{cid:cid},function(re){
        var data=JSON.parse(re);
        for(var i=0;i<data.length;i++){
          $("#k1id").append("<option value='"+data[i]["id"]+"' >"+data[i]["title"]+"</option>")
        }
      })
   })
    $(".query").click(function(){
      document.getElementById("f1").submit();
    })
    $(".emptyIf").click(function(){
      location.href="{:url('yssy')}"
    })
        $(document).ready(function(){
          var $ObjectNum =$(".ObjectNum");
             toNum($ObjectNum);
        })
        /*请输入关键字或空格查询*/

    </script>
</body>

</html>
